package edu.gdut.thesissys.action.director;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import edu.gdut.thesissys.action.BaseAction;
import edu.gdut.thesissys.service.FindMajorsService;

/**
 * 获取专业
 * 
 * @author gauze
 * 
 */
public class FindMajorsAction extends BaseAction {

	private static final Logger log = LoggerFactory
			.getLogger(FindMajorsAction.class);
	/**
	 * 
	 */
	private static final long serialVersionUID = -4806955090374521865L;

	@Resource(name = "findMajorsService")
	private FindMajorsService findMajorsService;

	public Object majors = new Object();

	public String execute() {
		log.info("find all majors");
		this.majors = findMajorsService.findMajorsJson();
		log.info("find all majors successful and return data: "
				+ majors.toString());
		return SUCCESS;
	}

}
